import {ASSIGNWORK} from './actionType'
import { get } from '@u/http'

const loadSync =data=>{
    return{
        type: ASSIGNWORK,
        data
    }
} 

const loadAsync = ()=>{
    return async dispatch=>{
        let result = await get({
            url:'api/zuoye/menu?xkId=1'
        })

        // console.log(result)
        dispatch( loadSync( result.data ))
    }
}

export {
    loadSync,
    loadAsync
}